Use the following syntax to specify the stateID attribute - 2 states plus Error:
stateId="enumeration"
where enumeration is one of: 0 | 1 | Error
For the momentaryButton, the released state is State 0. The pressed state is State 1.
For the latchedButton, the unlatched state is State 0. The latched state is State 1.
For the maintainedButton, the state toggles between 0 and 1 each time the button is pressed and released.